<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件对象：阻止默认行为</title>
    <script src="./js/js23_event_prevent.js" async></script>
</head>
<body>
    <h1>事件对象：阻止默认行为</h1>
    <p>e.preventDefault()  通常用于表单的提交</p>
    <form action="">
        <label for="username">用户名</label>
        <input type="text" name="username" id="username" placeholder="请输入用户名">
        <button type="submit">登录</button>
    </form>
    <p></p>
</body>
</html>